package com.tensquare.friend.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "tensquare-user")
public interface UserClient {

    /**
     * 更新添加好友的粉丝数。同时增加自己的关注数
     * 因为是提供给后台调用的，所以不需要返回值
     */
    // 请求路径记得添加UserController的全局路径/user
    @RequestMapping(value = "/user/{userid}/{friendid}/{x}", method = RequestMethod.PUT)
    public void updateFansCountAndFollowCount(@PathVariable(name = "userid") String userid,
                                              @PathVariable(name = "friendid") String friendid,
                                              @PathVariable(name = "x") int x);

}
